package designpattern.observe.improve;

public class TaoBaoObserve implements Observe {

    private float temperature;

    private float pressure;

    private float humidity;
    @Override
    public void update(float temperature, float pressure, float humidity) {
        this.temperature = temperature;
        this.pressure = pressure;
        this.humidity = humidity;
        display();
    }

    @Override
    public void display() {
        System.out.println("TaoBao temperature:"+temperature);
        System.out.println("TaoBao pressure:"+pressure);
        System.out.println("TaoBao humidity:"+humidity);
    }
}
